package org.millioncall.yueyoga.admin.dao.impl;

import java.util.List;
import java.util.Map;

import org.millioncall.openplatform.dao.PreparedQuery;
import org.millioncall.yueyoga.admin.dao.BaseDao;
import org.millioncall.yueyoga.admin.dao.MemberClazzDAO;
import org.millioncall.yueyoga.admin.model.MemberClazz;

public class MemberClazzDAOImpl extends BaseDao implements MemberClazzDAO {

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return this.getPagableSqlSessionTemplate().delete("deleteMemberClazzByPrimaryKey", id);
	}

	@Override
	public int insert(MemberClazz record) {
		return this.getPagableSqlSessionTemplate().insert("insertMemberClazz", record);
	}

	@Override
	public int insertSelective(MemberClazz record) {
		return this.getPagableSqlSessionTemplate().insert("insertSelectiveMemberClazz", record);
	}

	@Override
	public MemberClazz selectByPrimaryKey(Integer id) {
		return this.getPagableSqlSessionTemplate().selectOne("selectByPrimaryKey", id);
	}

	@Override
	public int updateByPrimaryKeySelective(MemberClazz record) {
		return this.getPagableSqlSessionTemplate().update("updateByPrimaryKeySelective", record);
	}

	@Override
	public int updateByPrimaryKey(MemberClazz record) {
		return this.getPagableSqlSessionTemplate().update("updateByPrimaryKey", record);
	}

	@Override
	public List<MemberClazz> findAllMemberInThisClazz(Map<String, Object> map) {
		PreparedQuery<MemberClazz> pq = this.getPagableSqlSessionTemplate().findAll("findAllMemberInThisClazz", map);
		return pq.list();
	}

}
